package com.ryujung.hash.leetcode_652;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

/*
 * @lc app=leetcode.cn id=652 lang=java
 *
 * [652] 寻找重复的子树
 */

// @lc code=start
class Solution {
    /**
     * 思路：
     * 遍历整棵树，
     */
    public List<TreeNode> findDuplicateSubtrees(TreeNode root) {
        HashMap<TreeNode, List<TreeNode>> map = new HashMap<TreeNode, List<TreeNode>>();
        List<TreeNode> result = new LinkedList<TreeNode>();
        TreeNode curNode = root;
        
        return result;
    }

    public class TreeNode {
        int val;
        TreeNode left;
        TreeNode right;

        TreeNode() {
        }

        TreeNode(int val) {
            this.val = val;
        }

        TreeNode(int val, TreeNode left, TreeNode right) {
            this.val = val;
            this.left = left;
            this.right = right;
        }
    }
}
// @lc code=end
